﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZDSoft.LMS.Domain;
using NHibernate.Criterion;

namespace ZDSoft.LMS.Service
{
    public interface ITransportOrderService:IBaseService<TransportOrder>
    {
        /// <summary>
        /// 新建
        /// </summary>
        /// <param name="entity">实体名</param>
        void Create(TransportOrder entity);

        void Create(TransportOrder entity, string txtCargoData,
            string txtStartSatationID, string txtStartProvinceID, string txtDestionationID, string txtDestionationProvinceID,
            string txtSendManID, string txtBillManID);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="entity">实体名</param>
        void Update(TransportOrder entity);

        /// <summary>
        /// 根据ID获取
        /// </summary>
        /// <param name="ID">ID编号</param>
        /// <returns>ID</returns>
        TransportOrder Get(int ID);

        /// <summary>
        /// 根据ID删除
        /// </summary>
        /// <param name="ID">ID</param>
        void Delete(int ID);

        /// <summary>
        /// 根据实体删除
        /// </summary>
        /// <param name="entity">删除</param>
        void Delete(TransportOrder entity);

        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        IList<TransportOrder> GetAll();

        /// <summary>
        /// 获取满足条件的记录
        /// </summary>
        /// <param name="queryConditions">条件</param>
        /// <returns></returns>
        IList<TransportOrder> GetAll(IList<ICriterion> queryConditions);

        /// <summary>
        /// 分页获取满足条件的记录
        /// </summary>
        /// <param name="queryConditions">条件</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页显示数量</param>
        /// <param name="orderField"></param>
        /// <param name="isAscending">升序 true,降序 false</param>
        /// <param name="count">数量集合数量</param>
        /// <returns></returns>
        IList<TransportOrder> GetPaged(IList<ICriterion> queryConditions, IList<Order> orderList, int pageIndex, int pageSize, out int count);

        #region hql测试 create by lengyahong
        TransportOrder GetTransportOrderTest(string startStation, string provinceName, int creatorID);
        IList<TransportOrder> GetTransportOrderTest(string startStation, string provinceName, string receiveName);
        #endregion
    }
}
